
using System;

namespace GeoAPI.Indexing
{
    /// <summary>
    /// A bounded object in a spatial index.
    /// </summary>
    public interface IBoundable<TBounds>
    {
        /// <summary> 
        /// Returns a representation of space that encloses the boundable object,
        /// preferably not much bigger than this <see cref="IBoundable{TBounds}"/>'s 
        /// boundary yet fast to test for intersection
        /// with the bounds of other <see cref="IBoundable{TBounds}"/> instances. 
        /// The class of object returned depends on the implementation of 
        /// <see cref="ISpatialIndex{TBounds, TItem}"/>.
        /// </summary>
        /// <returns> 
        /// An IExtents (for R trees or QuadTrees), an Interval (for SIR trees), 
        /// or another object (for other subclasses of AbstractStrTree).
        /// </returns>
        TBounds Bounds { get; }

        Boolean Intersects(TBounds bounds);
    }
}